package eu.sudparis.it.opp.observfram;

import eu.sudparis.it.opp.Graph;
import eu.sudparis.it.opp.Node;
import eu.sudparis.it.opp.TimeSeries;
import eu.sudparis.it.opp.ex.TimeSeriesLoader;

public class ObserverFrameWork extends TimeSeriesLoader {
	public Node property;

	public void setProperty(Node nd) {
		this.property = nd;
	}

	public TimeSeries load(String[] args) {
		TimeSeries ts = super.load(args);
		ts.graph=new Graph();
		for (int i = ts.min_id; i <=ts.max_id; i++) {
			ObserverNode kn=new ObserverNode(i, ts);
			if(this.property!=null)
				this.property.clone().embedInto(kn, ts.graph);
		}
		//System.out.println(ts.graph.graph);
		return ts;
	}
}
